/*
 * Lattice.java
 *
 * Created on September 14, 2006, 2:41 PM
 *
 * (C) 2006 R. Alexander Milowski
 */

package com.smallx.xproc.compiler.graph;

import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

/**
 *
 * @author alex
 */
public class Lattice extends Graph  {
   
   Set<Vertex> starts;
   Set<Vertex> ends;
   /** Creates a new instance of Lattice */
   public Lattice(String id) {
      super(id);
      this.starts = new HashSet<Vertex>();
      this.ends = new HashSet<Vertex>();
   }
   
   public void addStart(Vertex v) {
      addVertex(v);
      starts.add(v);
   }
   
   public void addEnd(Vertex v) {
      addVertex(v);
      ends.add(v);
   }
   
   public Set<Vertex> getStartingVertices() {
      return starts;
   }
   
   public Set<Vertex> getEndingVertices() {
      return ends;
   }
}
